﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once
#include "IFamily2DSketchCurve.h"
#include "GmFamilyService.h"
#include "ElementCreationOptions.h"

namespace gfam
{
    /// \brief 草图椭圆线的接口类
    class GM_FAMILY_SERVICE_EXPORT IFamily2DSketchEllipse : public gfam::IFamily2DSketchCurve
    {
        DEFINE_CAST_DERIVED(gfam::IFamily2DSketchEllipse, gfam::IFamily2DSketchCurve)
    public:

        /// \brief  创建草图椭圆线
        ///
        /// \param  pDocument  文档
        /// \param  sketchId 草图id
        /// \param  sketchPlaneId 草图平面id
        /// \param  center 中心点
        /// \param  normal 法向
        /// \param  majorAxis 主轴方向
        /// \param  majorRadius 主轴半径
        /// \param  minorRadius 副轴半径
        /// \param  startAngle 起始角度
        /// \param  endAngle 终止角度
        /// \param  clockSign 时针方向
        /// \return 草图椭圆线
        static IFamily2DSketchEllipse* Create(
            gcmp::IDocument* pDocument
            , const gcmp::ElementId& sketchId
            , const gcmp::ElementId& sketchPlaneId
            , const gcmp::Vector3d& center
            , const gcmp::Vector3d& normal
            , const gcmp::Vector3d& majorAxis
            , double majorRadius
            , double minorRadius
            , double startAngle
            , double endAngle
            , bool clockSign);


        /// \brief  创建图形表达
        virtual void CreateCurveGrep() = 0;

        /// \brief  获取中心显示关联更新id
        ///
        /// \return 中心显示关联更新id
        virtual RegenDataId GetCenterVisibleRdId() const = 0;

        /// \brief  设置中心是否显示
        ///
        /// \param visible 可见性
        virtual void SetEllipseCenterVisible(bool visible) = 0;

        /// \brief  获取中心是否显示
        ///
        /// \return  中心可见性
        virtual bool GetEllipseCenterVisible() const = 0;


        /// \brief  获取中心坐标
        ///
        /// \return  中心坐标
        virtual gcmp::Vector3d GetCenter()const = 0;

        /// \brief  获取是否逆时针
        ///
        /// \return  逆时针方向
        virtual bool IsAntiClockwise() const = 0;

        /// \brief  获取主轴半径
        ///
        /// \return  主轴半径
        virtual double GetMajorRadius() const = 0;

        /// \brief  获取副轴半径
        ///
        /// \return  副轴半径
        virtual double GetMinorRadius() const = 0;
        /// \brief  获取起始角度
        ///
        /// \return  起始角度
        virtual double GetStartAngle() const = 0;

        /// \brief  获取终止角度
        ///
        /// \return  终止角度
        virtual double GetEndAngle() const = 0;

        /// \brief  获取法向
        ///
        /// \return  法向
        virtual gcmp::Vector3d GetNormal() const = 0;


        /// \brief  获取主轴方向
        ///
        /// \return  主轴方向
        virtual gcmp::Vector3d GetMajorAxis()const = 0;

        /// \brief  获取副轴方向
        ///
        /// \return  副轴方向
        virtual gcmp::Vector3d GetMinorAxis()const = 0;
    };
}